package com.canbot.u05.activity.firstguide

import android.os.Bundle
import android.view.View

import com.canbot.u05.MainApplication
import com.canbot.u05.R
import com.canbot.u05.activity.BaseActivityNoTitle
import com.canbot.u05.activity.MyRobotActivity
import com.canbot.u05.socket.MsgSendUtils
import com.canbot.u05.socket.MsgType
import com.canbot.u05.utils.PathConst

/**
 * desc: 其他设置说明界面
 * author: xxl
 * date: 2019/6/19
 */
class OtherInstructionActivity : BaseActivityNoTitle() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_other_instruction)
    }

    override fun onResume() {
        super.onResume()
        MsgSendUtils.sendStringMsg(MsgType.PLAY_SOUND, PathConst.ADMIN_AUDIO_PATH + "qtszsm_szscyd_u05_001.mp3")
    }

    fun back(view: View) = finish()

    fun gotIt(view: View) {
        MsgSendUtils.sendStringMsg(MsgType.STOP_SOUND, "stop_sound")
        MsgSendUtils.sendStringMsg(MsgType.SEND_CONN_SUCCESS, "conn success")
        MainApplication.finishActivity(AdvisoryInstructionActivity::class.java.name)
        MainApplication.finishActivity(FaceInstructionActivity::class.java.name)
        MainApplication.finishActivity(MapInstructionActivity::class.java.name)
        MainApplication.finishActivity(SceneModuleActivity::class.java.name)
        MainApplication.finishActivity(SceneChooseActivity::class.java.name)
        MainApplication.finishActivity(SceneChooseActivity::class.java.name)
        MainApplication.finishActivity(PasswordSetActivity::class.java.name)
        finish()
    }
}
